//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.Collections;
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Resources;
			using System.Windows.Forms;
			using Utility;
			
		#endregion
		
	public class frmLapHSBenhAnYTa : Form
	
	{
		
		#region Fields
			private Button btAdd;
			private Button btLuuBenhAn;
			private Button btRemove;
			private Button btReset;
			private Button btThoat;
			private string clrISN;
			private IContainer components;
			private string connStr;
			private Database_Com db;
			private DateTimePicker dtpBirthDay;
			private frmKQXetNghiem fKQ;
			public int flag;
			private GroupBox groupBox1;
			private GroupBox groupBox2;
			private GroupBox groupBox3;
			private GroupBox groupBox4;
			private bool insertXetNghiem;
			private Label label1;
			private Label label10;
			private Label label11;
			private Label label12;
			private Label label13;
			private Label label15;
			private Label label16;
			private Label label19;
			private Label label2;
			private Label label21;
			private Label label3;
			private Label label4;
			private Label label5;
			private Label label6;
			private Label label7;
			private Label label8;
			private Label label9;
			private ListView listView1;
			private TreeNode node;
			private RadioButton rbFemale;
			private RadioButton rbMale;
			private TextBox tbAddress;
			private TextBox tbBenhNgoaiDS;
			public TextBox tbBenhSu;
			private TextBox tbCanNang;
			private TextBox tbDiDong;
			private TextBox tbFullName;
			private TextBox tbHuyetAp;
			private TextBox tbID;
			private TextBox tbJob;
			private TextBox tbMach;
			private TextBox tbNhietDo;
			private TextBox tbPhone;
			private TextBox tbTuoi;
			private ToolTip toolTip1;
			private TreeView treeView1;
		#endregion
		
		#region Constructors
		
			public frmLapHSBenhAnYTa ()
			
			{
				this.db = new Database_Com ();
				this.flag = 1;
				this.clrISN = string.Empty;
				this.InitializeComponent ();
				this.connStr = Connection.ConnectionString ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void btAdd_Click (object sender, EventArgs e)
			
			{
				this.treeView1_DoubleClick (sender, e);
				return;
			}
			
			private void btLuuBenhAn_Click (object sender, EventArgs e)
			
			{
				string theString;
				string theString2;
				string theString3;
				string theString4;
				string theString5;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				ArrayList theArrayList;
				ArrayList theArrayList2;
				ArrayList theArrayList3;
				int i;
				int i2;
				string theString6;
				string theString7;
				int i3;
				SqlCommand theSqlCommand;
				SqlParameter theSqlParameter;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable2;
				int i4;
				SqlCommand theSqlCommand2;
				DateTime theDateTime;
				Color theColor;
				string[] theStringArray;
				string[] theStringArray2;
				SqlDbType[] theSqlDbTypeArray;
				object[] theObjectArray;
				DateTime theDateTime2;
				if (! this.CheckData ())
				{
					goto L_08A3;
				}
				if (this.tbPhone.Text.Length <= 0)
				{
					goto L_004E;
				}
				if (this.IsNumber (this.tbPhone.Text.ToString ()))
				{
					goto L_004E;
				}
				DialogResult theDialogResult = MessageBox.Show ("S? ?i?n tho?i kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_08A3;
				
			L_004E:
				
				{
				}
				if (this.tbDiDong.Text.Length <= 0)
				{
					goto L_0091;
				}
				if (this.IsNumber (this.tbDiDong.Text.ToString ()))
				{
					goto L_0091;
				}
				DialogResult theDialogResult2 = MessageBox.Show ("S? ?i?n tho?i di ??ng kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_08A3;
				
			L_0091:
				
				{
				}
				if (this.tbMach.Text.Length <= 0)
				{
					goto L_00E7;
				}
				if (this.IsNumber (this.tbMach.Text.ToString ()))
				{
					goto L_00D4;
				}
				DialogResult theDialogResult3 = MessageBox.Show ("M?ch kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_08A3;
				
			L_00D4:
				
				{
				}
				theString = this.tbMach.Text.ToString ();
				goto L_00ED;
				
			L_00E7:
				
				{
				}
				theString = "0";
				
			L_00ED:
				
				{
				}
				if (this.tbNhietDo.Text.Length <= 0)
				{
					goto L_0143;
				}
				if (this.IsFloat (this.tbNhietDo.Text.ToString ()))
				{
					goto L_0130;
				}
				DialogResult theDialogResult4 = MessageBox.Show ("Nhi?t ?? kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_08A3;
				
			L_0130:
				
				{
				}
				theString2 = this.tbNhietDo.Text.ToString ();
				goto L_0149;
				
			L_0143:
				
				{
				}
				theString2 = "0";
				
			L_0149:
				
				{
				}
				if (this.tbCanNang.Text.Length <= 0)
				{
					goto L_019F;
				}
				if (this.IsFloat (this.tbCanNang.Text.ToString ()))
				{
					goto L_018C;
				}
				DialogResult theDialogResult5 = MessageBox.Show ("C?n n?ng kh?ng h?p l?", "L?i nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_08A3;
				
			L_018C:
				
				{
				}
				theString4 = this.tbCanNang.Text.ToString ();
				goto L_01A5;
				
			L_019F:
				
				{
				}
				theString4 = "0";
				
			L_01A5:
				
				{
				}
				theString3 = this.tbHuyetAp.Text.ToString ();
				this.dtpBirthDay.CustomFormat = "MM/dd/yyyy";
				
			L_01DF:
				
				{
				}
				
			L_01DA:
				
				{
				}
				theString5 = (this.rbMale.Checked ? "Nam" : "N?");
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter ("Select IDENT_CURRENT(\'ClinicalRecord\')", theSqlConnection);
				theDataSet = new DataSet ();
				int i5 = theSqlDataAdapter.Fill (theDataSet, "ClinicalRecord");
				theDataTable = theDataSet.Tables["ClinicalRecord"];
				this.clrISN = Convert.ToString (((int) (int.Parse (theDataTable.Rows[0][0].ToString ()) + 1)));
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				theArrayList = new ArrayList ();
				theArrayList2 = new ArrayList ();
				theArrayList3 = new ArrayList ();
				i = this.listView1.Items.Count;
				i2 = 0;
				goto L_036D;
				
			L_028C:
				
				{
				}
				theString6 = this.listView1.Items[i2].Text.ToString ();
				theString7 = (theColor = this.listView1.Items[i2].ForeColor).Name.ToString ();
				if (theString7 != "Red")
				{
					goto L_02ED;
				}
				int i6 = theArrayList3.Add (0);
				
			L_02ED:
				
				{
				}
				if (theString7 != "Blue")
				{
					goto L_0309;
				}
				int i7 = theArrayList3.Add (1);
				
			L_0309:
				
				{
				}
				if (theString7 != "Purple")
				{
					goto L_0325;
				}
				int i8 = theArrayList3.Add (2);
				
			L_0325:
				
				{
				}
				if (theString7 != "Green")
				{
					goto L_0341;
				}
				int i9 = theArrayList3.Add (3);
				
			L_0341:
				
				{
				}
				if (theString7 != "Gray")
				{
					goto L_035D;
				}
				int i10 = theArrayList3.Add (4);
				
			L_035D:
				
				{
				}
				int i11 = theArrayList.Add (theString6);
				i2++;
				
			L_036D:
				
				{
				}
				if (i2 < i)
				{
					goto L_028C;
				}
				i3 = 0;
				goto L_041D;
				
			L_037E:
				
				{
				}
				theSqlCommand = new SqlCommand ("SELECT * FROM Sicks WHERE sckName=@sckName", theSqlConnection);
				theSqlParameter = new SqlParameter ("@sckName", SqlDbType.NVarChar);
				theSqlParameter.Value = theArrayList[i3].ToString ();
				SqlParameter theSqlParameter2 = theSqlCommand.Parameters.Add (theSqlParameter);
				theSqlDataAdapter2 = new SqlDataAdapter (theSqlCommand);
				theDataSet2 = new DataSet ();
				int i12 = theSqlDataAdapter2.Fill (theDataSet2, "Sicks");
				theDataTable2 = theDataSet2.Tables["Sicks"];
				int i13 = theArrayList2.Add (theDataTable2.Rows[0][0].ToString ());
				theSqlDataAdapter2.Dispose ();
				i3++;
				
			L_041D:
				
				{
				}
				if (i3 < theArrayList.Count)
				{
					goto L_037E;
				}
				i4 = 0;
				goto L_04C3;
				
			L_0433:
				
				{
				}
				theStringArray = new string[7];
				theStringArray[0] = "INSERT INTO ClinicalSicks VALUES(";
				theStringArray[1] = theArrayList2[i4].ToString ();
				theStringArray[2] = ", ";
				theStringArray[3] = this.clrISN;
				theStringArray[4] = ",";
				theStringArray[5] = theArrayList3[i4].ToString ();
				theStringArray[6] = ")";
				theSqlCommand2 = new SqlCommand (string.Concat (theStringArray), theSqlConnection);
				theSqlCommand2.Connection.Open ();
				int i14 = theSqlCommand2.ExecuteNonQuery ();
				theSqlCommand2.Connection.Close ();
				i4++;
				
			L_04C3:
				
				{
				}
				if (i4 < theArrayList2.Count)
				{
					goto L_0433;
				}
				this.LoadID ();
				SqlConnection theSqlConnection2 = this.db.CreateConnections ();
				theDateTime = ((DateTime) this.db.ExecuteScalar ("select getDate()"));
				theStringArray2 = new string[27];
				theStringArray2[0] = "@patID";
				theStringArray2[1] = "@patName";
				theStringArray2[2] = "@patBirthDate";
				theStringArray2[3] = "@patAge";
				theStringArray2[4] = "@patSex";
				theStringArray2[5] = "@patAddress";
				theStringArray2[6] = "@patTel";
				theStringArray2[7] = "@patOccupation";
				theStringArray2[8] = "@empISN";
				theStringArray2[9] = "@clrPulse";
				theStringArray2[10] = "@clrTemperature";
				theStringArray2[11] = "@clrBloodPressure";
				theStringArray2[12] = "@clrWeigh";
				theStringArray2[13] = "@clrMedicalHistory";
				theStringArray2[14] = "@clrTest";
				theStringArray2[15] = "@clrSickNotInList";
				theStringArray2[16] = "@clrExaminationTimes";
				theStringArray2[17] = "@clrExaminationDate";
				theStringArray2[18] = "@clrSkill";
				theStringArray2[19] = "@clrMedicalAdvice";
				theStringArray2[20] = "@clrFollowUpExaminationDate";
				theStringArray2[21] = "@clrPicture";
				theStringArray2[22] = "@clrSurgery";
				theStringArray2[23] = "@patMobile";
				theStringArray2[24] = "@clrSickHistory";
				theStringArray2[25] = "@clrRexaminationTimes";
				theStringArray2[26] = "@clrRexaminationStatus";
				theSqlDbTypeArray = new SqlDbType[27];
				theSqlDbTypeArray[0] = SqlDbType.VarChar;
				theSqlDbTypeArray[1] = SqlDbType.NVarChar;
				theSqlDbTypeArray[2] = SqlDbType.DateTime;
				theSqlDbTypeArray[3] = SqlDbType.TinyInt;
				theSqlDbTypeArray[4] = SqlDbType.NVarChar;
				theSqlDbTypeArray[5] = SqlDbType.NVarChar;
				theSqlDbTypeArray[6] = SqlDbType.NVarChar;
				theSqlDbTypeArray[7] = SqlDbType.NVarChar;
				theSqlDbTypeArray[8] = SqlDbType.Int;
				theSqlDbTypeArray[9] = SqlDbType.Float;
				theSqlDbTypeArray[10] = SqlDbType.Float;
				theSqlDbTypeArray[11] = SqlDbType.VarChar;
				theSqlDbTypeArray[12] = SqlDbType.Float;
				theSqlDbTypeArray[13] = SqlDbType.NVarChar;
				theSqlDbTypeArray[14] = SqlDbType.NVarChar;
				theSqlDbTypeArray[15] = SqlDbType.NVarChar;
				theSqlDbTypeArray[16] = SqlDbType.Int;
				theSqlDbTypeArray[17] = SqlDbType.DateTime;
				theSqlDbTypeArray[18] = SqlDbType.NVarChar;
				theSqlDbTypeArray[19] = SqlDbType.NVarChar;
				theSqlDbTypeArray[20] = SqlDbType.DateTime;
				theSqlDbTypeArray[21] = SqlDbType.VarChar;
				theSqlDbTypeArray[22] = SqlDbType.NVarChar;
				theSqlDbTypeArray[23] = SqlDbType.NVarChar;
				theSqlDbTypeArray[24] = SqlDbType.NVarChar;
				theSqlDbTypeArray[25] = SqlDbType.Int;
				theSqlDbTypeArray[26] = SqlDbType.TinyInt;
				theObjectArray = new object[27];
				theObjectArray[0] = this.tbID.Text.ToString ();
				theObjectArray[1] = this.tbFullName.Text.ToString ();
				theObjectArray[2] = this.dtpBirthDay.Text;
				theObjectArray[3] = this.tbTuoi.Text.ToString ();
				theObjectArray[4] = theString5;
				theObjectArray[5] = this.tbAddress.Text.ToString ();
				theObjectArray[6] = this.tbPhone.Text.ToString ();
				theObjectArray[7] = this.tbJob.Text.ToString ();
				theObjectArray[8] = "1";
				theObjectArray[9] = theString;
				theObjectArray[10] = theString2;
				theObjectArray[11] = theString3;
				theObjectArray[12] = theString4;
				theObjectArray[13] = this.tbBenhSu.Text.ToString ();
				theObjectArray[14] = "";
				theObjectArray[15] = this.tbBenhNgoaiDS.Text.ToString ();
				theObjectArray[16] = "1";
				theObjectArray[17] = theDateTime.ToString ();
				theObjectArray[18] = "";
				theObjectArray[19] = "";
				theObjectArray[20] = "2004/01/01";
				theObjectArray[21] = "";
				theObjectArray[22] = "";
				theObjectArray[23] = this.tbDiDong.Text.ToString ();
				theObjectArray[24] = "";
				theObjectArray[25] = 0;
				theObjectArray[26] = 0;
				this.db.ExecuteStoredProc ("sp_Patients_ClinicalRecordNurse_Insert", theStringArray2, theSqlDbTypeArray, theObjectArray);
				theArrayList.Clear ();
				theArrayList2.Clear ();
				theSqlConnection.Close ();
				DialogResult theDialogResult6 = MessageBox.Show ("B?nh ?n ?? ???c l?u", "L?p b?nh ?n", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				this.btLuuBenhAn.Enabled = false;
				this.dtpBirthDay.Text = (theDateTime2 = DateTime.Now).ToString ();
				this.dtpBirthDay.CustomFormat = "dd/MM/yyyy";
				this.insertXetNghiem = true;
				
			L_08A3:
				return;
			}
			
			private void btRemove_Click (object sender, EventArgs e)
			
			{
				this.listView1_DoubleClick (sender, e);
				return;
			}
			
			private void btReset_Click (object sender, EventArgs e)
			
			{
				this.tbFullName.Text = "";
				this.tbTuoi.Text = "";
				this.rbMale.Checked = true;
				this.tbAddress.Text = "";
				this.tbPhone.Text = "";
				this.tbDiDong.Text = "";
				this.tbJob.Text = "";
				this.tbBenhSu.Text = "";
				this.tbBenhNgoaiDS.Text = "";
				this.tbMach.Text = "";
				this.tbNhietDo.Text = "";
				this.tbHuyetAp.Text = "";
				this.tbCanNang.Text = "";
				this.listView1.Items.Clear ();
				this.btLuuBenhAn.Enabled = true;
				this.LoadID ();
				return;
			}
			
			private void btThoat_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private bool CheckData ()
			
			{
				bool theBoolean;
				if (this.tbFullName.Text != "")
				{
					goto L_0031;
				}
				DialogResult theDialogResult = MessageBox.Show ("Vui l?ng nh?p h? v? t?n", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_0031:
				
				{
				}
				if (this.tbTuoi.Text == "")
				{
					goto L_0061;
				}
				if (Convert.ToInt64 (this.tbTuoi.Text.ToString ()) >= ((long) 0))
				{
					goto L_0078;
				}
				
			L_0061:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Vui l?ng ch?n ng?y sinh h?p l?", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_0078:
				
				{
				}
				if (this.tbAddress.Text != "")
				{
					goto L_00A6;
				}
				DialogResult theDialogResult3 = MessageBox.Show ("Vui l?ng nh?p ??a ch?", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_00A6:
				
				{
				}
				if (this.listView1.Items.Count > 0)
				{
					goto L_00E7;
				}
				if (this.tbBenhNgoaiDS.Text != "")
				{
					goto L_00E7;
				}
				DialogResult theDialogResult4 = MessageBox.Show ("Vui l?ng ch?n tri?u ch?ng", "L?i Nh?p", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_00EB;
				
			L_00E7:
				
				{
				}
				theBoolean = true;
				goto L_00EB;
				
			L_00EB:
				
				{
				}
				return theBoolean;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				this.flag = 0;
				if (! disposing)
				{
					goto L_001D;
				}
				if (this.components == null)
				{
					goto L_001D;
				}
				this.components.Dispose ();
				
			L_001D:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void dtpBirthDay_Leave (object sender, EventArgs e)
			
			{
				DateTime theDateTime;
				DateTime theDateTime2;
				this.dtpBirthDay.CustomFormat = "MM/dd/yyyy";
				this.tbTuoi.Text = Convert.ToString (((int) (Convert.ToInt32 ((theDateTime2 = DateTime.Now).Year) - Convert.ToInt32 ((theDateTime = DateTime.Parse (this.dtpBirthDay.Text)).Year))));
				this.dtpBirthDay.CustomFormat = "dd/MM/yyyy";
				return;
			}
			
			private void frmLapHSBenhAnYTa_Load (object sender, EventArgs e)
			
			{
				this.LoadCayBenh ();
				this.LoadID ();
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				Control[] theControlArray;
				Control[] theControlArray2;
				Control[] theControlArray3;
				Control[] theControlArray4;
				Control[] theControlArray5;
				this.components = ((IContainer) new System.ComponentModel.Container ());
				theResourceManager = new ResourceManager (typeof (frmLapHSBenhAnYTa));
				this.groupBox3 = new GroupBox ();
				this.tbBenhSu = new TextBox ();
				this.label13 = new Label ();
				this.tbBenhNgoaiDS = new TextBox ();
				this.label15 = new Label ();
				this.groupBox1 = new GroupBox ();
				this.tbDiDong = new TextBox ();
				this.dtpBirthDay = new DateTimePicker ();
				this.rbMale = new RadioButton ();
				this.tbJob = new TextBox ();
				this.tbPhone = new TextBox ();
				this.tbAddress = new TextBox ();
				this.tbTuoi = new TextBox ();
				this.tbID = new TextBox ();
				this.tbFullName = new TextBox ();
				this.label7 = new Label ();
				this.label6 = new Label ();
				this.label5 = new Label ();
				this.label4 = new Label ();
				this.label3 = new Label ();
				this.label2 = new Label ();
				this.label1 = new Label ();
				this.label8 = new Label ();
				this.rbFemale = new RadioButton ();
				this.label21 = new Label ();
				this.btThoat = new Button ();
				this.toolTip1 = new ToolTip (this.components);
				this.label19 = new Label ();
				this.btLuuBenhAn = new Button ();
				this.btRemove = new Button ();
				this.btAdd = new Button ();
				this.treeView1 = new TreeView ();
				this.tbCanNang = new TextBox ();
				this.tbHuyetAp = new TextBox ();
				this.label12 = new Label ();
				this.label11 = new Label ();
				this.tbNhietDo = new TextBox ();
				this.tbMach = new TextBox ();
				this.label10 = new Label ();
				this.label9 = new Label ();
				this.groupBox2 = new GroupBox ();
				this.label16 = new Label ();
				this.listView1 = new ListView ();
				this.groupBox4 = new GroupBox ();
				this.btReset = new Button ();
				this.groupBox3.SuspendLayout ();
				this.groupBox1.SuspendLayout ();
				this.groupBox2.SuspendLayout ();
				this.groupBox4.SuspendLayout ();
				base.SuspendLayout ();
				theControlArray = new Control[4];
				theControlArray[0] = ((Control) this.tbBenhSu);
				theControlArray[1] = ((Control) this.label13);
				theControlArray[2] = ((Control) this.tbBenhNgoaiDS);
				theControlArray[3] = ((Control) this.label15);
				this.groupBox3.Controls.AddRange (theControlArray);
				this.groupBox3.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox3.ForeColor = SystemColors.ControlText;
				this.groupBox3.Location = new Point (8, 264);
				this.groupBox3.Name = "groupBox3";
				this.groupBox3.Size = new System.Drawing.Size (344, 136);
				this.groupBox3.TabIndex = 1;
				this.groupBox3.TabStop = false;
				this.tbBenhSu.AutoSize = false;
				this.tbBenhSu.BorderStyle = BorderStyle.FixedSingle;
				this.tbBenhSu.Location = new Point (112, 15);
				this.tbBenhSu.MaxLength = 300;
				this.tbBenhSu.Multiline = true;
				this.tbBenhSu.Name = "tbBenhSu";
				this.tbBenhSu.ScrollBars = ScrollBars.Both;
				this.tbBenhSu.Size = new System.Drawing.Size (216, 48);
				this.tbBenhSu.TabIndex = 9;
				this.tbBenhSu.Text = "";
				this.label13.Location = new Point (16, 24);
				this.label13.Name = "label13";
				this.label13.TabIndex = 0;
				this.label13.Text = "Ti?n c?n:";
				this.tbBenhNgoaiDS.AutoSize = false;
				this.tbBenhNgoaiDS.BorderStyle = BorderStyle.FixedSingle;
				this.tbBenhNgoaiDS.Location = new Point (112, 72);
				this.tbBenhNgoaiDS.MaxLength = 300;
				this.tbBenhNgoaiDS.Multiline = true;
				this.tbBenhNgoaiDS.Name = "tbBenhNgoaiDS";
				this.tbBenhNgoaiDS.ScrollBars = ScrollBars.Both;
				this.tbBenhNgoaiDS.Size = new System.Drawing.Size (216, 56);
				this.tbBenhNgoaiDS.TabIndex = 11;
				this.tbBenhNgoaiDS.Text = "";
				this.label15.Location = new Point (16, 80);
				this.label15.Name = "label15";
				this.label15.Size = new System.Drawing.Size (112, 36);
				this.label15.TabIndex = 4;
				this.label15.Text = "Tri?u ch?ng ngo?i DS:";
				theControlArray2 = new Control[19];
				theControlArray2[0] = ((Control) this.tbDiDong);
				theControlArray2[1] = ((Control) this.dtpBirthDay);
				theControlArray2[2] = ((Control) this.rbMale);
				theControlArray2[3] = ((Control) this.tbJob);
				theControlArray2[4] = ((Control) this.tbPhone);
				theControlArray2[5] = ((Control) this.tbAddress);
				theControlArray2[6] = ((Control) this.tbTuoi);
				theControlArray2[7] = ((Control) this.tbID);
				theControlArray2[8] = ((Control) this.tbFullName);
				theControlArray2[9] = ((Control) this.label7);
				theControlArray2[10] = ((Control) this.label6);
				theControlArray2[11] = ((Control) this.label5);
				theControlArray2[12] = ((Control) this.label4);
				theControlArray2[13] = ((Control) this.label3);
				theControlArray2[14] = ((Control) this.label2);
				theControlArray2[15] = ((Control) this.label1);
				theControlArray2[16] = ((Control) this.label8);
				theControlArray2[17] = ((Control) this.rbFemale);
				theControlArray2[18] = ((Control) this.label21);
				this.groupBox1.Controls.AddRange (theControlArray2);
				this.groupBox1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox1.ForeColor = Color.Coral;
				this.groupBox1.Location = new Point (7, 45);
				this.groupBox1.Name = "groupBox1";
				this.groupBox1.Size = new System.Drawing.Size (344, 211);
				this.groupBox1.TabIndex = 0;
				this.groupBox1.TabStop = false;
				this.groupBox1.Text = "Th?ng Tin C? Nh?n";
				this.tbDiDong.BorderStyle = BorderStyle.FixedSingle;
				this.tbDiDong.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbDiDong.Location = new Point (238, 152);
				this.tbDiDong.MaxLength = 10;
				this.tbDiDong.Name = "tbDiDong";
				this.tbDiDong.Size = new System.Drawing.Size (90, 22);
				this.tbDiDong.TabIndex = 7;
				this.tbDiDong.Text = "";
				this.dtpBirthDay.CustomFormat = "dd/MM/yyyy";
				this.dtpBirthDay.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.dtpBirthDay.Format = DateTimePickerFormat.Custom;
				this.dtpBirthDay.Location = new Point (110, 80);
				this.dtpBirthDay.Name = "dtpBirthDay";
				this.dtpBirthDay.Size = new System.Drawing.Size (104, 22);
				this.dtpBirthDay.TabIndex = 1;
				this.dtpBirthDay.Leave += new EventHandler (this.dtpBirthDay_Leave);
				this.rbMale.Checked = true;
				this.rbMale.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.rbMale.ForeColor = SystemColors.ControlText;
				this.rbMale.Location = new Point (222, 102);
				this.rbMale.Name = "rbMale";
				this.rbMale.Size = new System.Drawing.Size (56, 24);
				this.rbMale.TabIndex = 3;
				this.rbMale.TabStop = true;
				this.rbMale.Text = "Nam";
				this.tbJob.BorderStyle = BorderStyle.FixedSingle;
				this.tbJob.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbJob.Location = new Point (110, 176);
				this.tbJob.MaxLength = 200;
				this.tbJob.Name = "tbJob";
				this.tbJob.Size = new System.Drawing.Size (218, 22);
				this.tbJob.TabIndex = 8;
				this.tbJob.Text = "";
				this.tbPhone.BorderStyle = BorderStyle.FixedSingle;
				this.tbPhone.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbPhone.Location = new Point (110, 152);
				this.tbPhone.MaxLength = 10;
				this.tbPhone.Name = "tbPhone";
				this.tbPhone.Size = new System.Drawing.Size (88, 22);
				this.tbPhone.TabIndex = 6;
				this.tbPhone.Text = "";
				this.tbAddress.BorderStyle = BorderStyle.FixedSingle;
				this.tbAddress.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbAddress.Location = new Point (110, 128);
				this.tbAddress.Name = "tbAddress";
				this.tbAddress.Size = new System.Drawing.Size (218, 22);
				this.tbAddress.TabIndex = 5;
				this.tbAddress.Text = "";
				this.tbTuoi.BorderStyle = BorderStyle.FixedSingle;
				this.tbTuoi.Enabled = false;
				this.tbTuoi.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbTuoi.Location = new Point (110, 104);
				this.tbTuoi.Name = "tbTuoi";
				this.tbTuoi.Size = new System.Drawing.Size (40, 22);
				this.tbTuoi.TabIndex = 2;
				this.tbTuoi.Text = "";
				this.tbID.BorderStyle = BorderStyle.FixedSingle;
				this.tbID.Enabled = false;
				this.tbID.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbID.Location = new Point (110, 32);
				this.tbID.Name = "tbID";
				this.tbID.Size = new System.Drawing.Size (104, 22);
				this.tbID.TabIndex = 811;
				this.tbID.Text = "";
				this.tbFullName.BorderStyle = BorderStyle.FixedSingle;
				this.tbFullName.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbFullName.Location = new Point (110, 56);
				this.tbFullName.Name = "tbFullName";
				this.tbFullName.Size = new System.Drawing.Size (216, 22);
				this.tbFullName.TabIndex = 0;
				this.tbFullName.Text = "";
				this.label7.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label7.ForeColor = SystemColors.ControlText;
				this.label7.Location = new Point (16, 176);
				this.label7.Name = "label7";
				this.label7.Size = new System.Drawing.Size (96, 23);
				this.label7.TabIndex = 6;
				this.label7.Text = "Ngh? nghi?p:";
				this.label6.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label6.ForeColor = SystemColors.ControlText;
				this.label6.Location = new Point (16, 152);
				this.label6.Name = "label6";
				this.label6.Size = new System.Drawing.Size (80, 23);
				this.label6.TabIndex = 5;
				this.label6.Text = "?i?n tho?i:";
				this.label5.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label5.ForeColor = SystemColors.ControlText;
				this.label5.Location = new Point (16, 128);
				this.label5.Name = "label5";
				this.label5.Size = new System.Drawing.Size (64, 23);
				this.label5.TabIndex = 4;
				this.label5.Text = "??a ch?:";
				this.label4.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label4.ForeColor = SystemColors.ControlText;
				this.label4.Location = new Point (16, 104);
				this.label4.Name = "label4";
				this.label4.Size = new System.Drawing.Size (48, 23);
				this.label4.TabIndex = 3;
				this.label4.Text = "Tu?i:";
				this.label3.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label3.ForeColor = SystemColors.ControlText;
				this.label3.Location = new Point (16, 80);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (80, 23);
				this.label3.TabIndex = 2;
				this.label3.Text = "Ng?y sinh:";
				this.label2.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label2.ForeColor = SystemColors.ControlText;
				this.label2.Location = new Point (16, 56);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (80, 23);
				this.label2.TabIndex = 1;
				this.label2.Text = "H? v? T?n:";
				this.label1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label1.ForeColor = SystemColors.ControlText;
				this.label1.Location = new Point (16, 32);
				this.label1.Name = "label1";
				this.label1.Size = new System.Drawing.Size (56, 23);
				this.label1.TabIndex = 0;
				this.label1.Text = "S? ID:";
				this.label8.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label8.ForeColor = SystemColors.ControlText;
				this.label8.Location = new Point (166, 105);
				this.label8.Name = "label8";
				this.label8.TabIndex = 15;
				this.label8.Text = "Ph?i:";
				this.rbFemale.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.rbFemale.ForeColor = SystemColors.ControlText;
				this.rbFemale.Location = new Point (286, 101);
				this.rbFemale.Name = "rbFemale";
				this.rbFemale.Size = new System.Drawing.Size (48, 24);
				this.rbFemale.TabIndex = 4;
				this.rbFemale.Text = "N?";
				this.label21.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label21.ForeColor = SystemColors.ControlText;
				this.label21.Location = new Point (206, 155);
				this.label21.Name = "label21";
				this.label21.TabIndex = 812;
				this.label21.Text = "D?:";
				this.btThoat.FlatStyle = FlatStyle.Popup;
				this.btThoat.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btThoat.Location = new Point (248, 16);
				this.btThoat.Name = "btThoat";
				this.btThoat.Size = new System.Drawing.Size (88, 23);
				this.btThoat.TabIndex = 21;
				this.btThoat.Text = "Tho?t";
				this.btThoat.Click += new EventHandler (this.btThoat_Click);
				this.toolTip1.AutoPopDelay = 5000;
				this.toolTip1.InitialDelay = 100;
				this.toolTip1.ReshowDelay = 100;
				this.label19.Font = new System.Drawing.Font ("Verdana", 12F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label19.ForeColor = Color.MediumBlue;
				this.label19.Location = new Point (280, 13);
				this.label19.Name = "label19";
				this.label19.Size = new System.Drawing.Size (184, 23);
				this.label19.TabIndex = 2562;
				this.label19.Text = "L?p H? S? B?nh ?n";
				this.btLuuBenhAn.FlatStyle = FlatStyle.Popup;
				this.btLuuBenhAn.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btLuuBenhAn.Location = new Point (144, 16);
				this.btLuuBenhAn.Name = "btLuuBenhAn";
				this.btLuuBenhAn.Size = new System.Drawing.Size (96, 23);
				this.btLuuBenhAn.TabIndex = 20;
				this.btLuuBenhAn.Text = "L?u B?nh ?n";
				this.btLuuBenhAn.Click += new EventHandler (this.btLuuBenhAn_Click);
				this.btRemove.FlatStyle = FlatStyle.Popup;
				this.btRemove.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btRemove.ForeColor = SystemColors.ControlText;
				this.btRemove.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btRemove.Image")));
				this.btRemove.Location = new Point (160, 160);
				this.btRemove.Name = "btRemove";
				this.btRemove.Size = new System.Drawing.Size (32, 23);
				this.btRemove.TabIndex = 18;
				this.btRemove.Click += new EventHandler (this.btRemove_Click);
				this.btAdd.FlatStyle = FlatStyle.Popup;
				this.btAdd.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.btAdd.ForeColor = SystemColors.ControlText;
				this.btAdd.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btAdd.Image")));
				this.btAdd.Location = new Point (160, 136);
				this.btAdd.Name = "btAdd";
				this.btAdd.Size = new System.Drawing.Size (32, 23);
				this.btAdd.TabIndex = 17;
				this.btAdd.Click += new EventHandler (this.btAdd_Click);
				this.treeView1.BorderStyle = BorderStyle.FixedSingle;
				this.treeView1.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.treeView1.ImageIndex = -1;
				this.treeView1.ItemHeight = 16;
				this.treeView1.Location = new Point (16, 96);
				this.treeView1.Name = "treeView1";
				this.treeView1.SelectedImageIndex = -1;
				this.treeView1.Size = new System.Drawing.Size (136, 200);
				this.treeView1.TabIndex = 16;
				this.treeView1.DoubleClick += new EventHandler (this.treeView1_DoubleClick);
				this.tbCanNang.BorderStyle = BorderStyle.FixedSingle;
				this.tbCanNang.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbCanNang.Location = new Point (256, 48);
				this.tbCanNang.Name = "tbCanNang";
				this.tbCanNang.Size = new System.Drawing.Size (72, 22);
				this.tbCanNang.TabIndex = 15;
				this.tbCanNang.Text = "";
				this.tbHuyetAp.BorderStyle = BorderStyle.FixedSingle;
				this.tbHuyetAp.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbHuyetAp.Location = new Point (256, 24);
				this.tbHuyetAp.Name = "tbHuyetAp";
				this.tbHuyetAp.Size = new System.Drawing.Size (72, 22);
				this.tbHuyetAp.TabIndex = 14;
				this.tbHuyetAp.Text = "";
				this.label12.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label12.ForeColor = SystemColors.ControlText;
				this.label12.Location = new Point (184, 48);
				this.label12.Name = "label12";
				this.label12.Size = new System.Drawing.Size (104, 23);
				this.label12.TabIndex = 16;
				this.label12.Text = "C?n n?ng:";
				this.label11.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label11.ForeColor = SystemColors.ControlText;
				this.label11.Location = new Point (184, 24);
				this.label11.Name = "label11";
				this.label11.Size = new System.Drawing.Size (80, 23);
				this.label11.TabIndex = 15;
				this.label11.Text = "Huy?t ?p:";
				this.tbNhietDo.BorderStyle = BorderStyle.FixedSingle;
				this.tbNhietDo.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbNhietDo.Location = new Point (96, 48);
				this.tbNhietDo.Name = "tbNhietDo";
				this.tbNhietDo.Size = new System.Drawing.Size (72, 22);
				this.tbNhietDo.TabIndex = 13;
				this.tbNhietDo.Text = "";
				this.tbMach.BorderStyle = BorderStyle.FixedSingle;
				this.tbMach.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.tbMach.Location = new Point (96, 24);
				this.tbMach.Name = "tbMach";
				this.tbMach.Size = new System.Drawing.Size (72, 22);
				this.tbMach.TabIndex = 12;
				this.tbMach.Text = "";
				this.label10.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label10.ForeColor = SystemColors.ControlText;
				this.label10.Location = new Point (16, 48);
				this.label10.Name = "label10";
				this.label10.Size = new System.Drawing.Size (72, 23);
				this.label10.TabIndex = 1;
				this.label10.Text = "Nhi?t ??:";
				this.label9.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label9.ForeColor = SystemColors.ControlText;
				this.label9.Location = new Point (16, 24);
				this.label9.Name = "label9";
				this.label9.Size = new System.Drawing.Size (48, 23);
				this.label9.TabIndex = 0;
				this.label9.Text = "M?ch:";
				theControlArray3 = new Control[13];
				theControlArray3[0] = ((Control) this.label16);
				theControlArray3[1] = ((Control) this.btRemove);
				theControlArray3[2] = ((Control) this.btAdd);
				theControlArray3[3] = ((Control) this.treeView1);
				theControlArray3[4] = ((Control) this.tbCanNang);
				theControlArray3[5] = ((Control) this.tbHuyetAp);
				theControlArray3[6] = ((Control) this.label12);
				theControlArray3[7] = ((Control) this.label11);
				theControlArray3[8] = ((Control) this.tbNhietDo);
				theControlArray3[9] = ((Control) this.tbMach);
				theControlArray3[10] = ((Control) this.label10);
				theControlArray3[11] = ((Control) this.label9);
				theControlArray3[12] = ((Control) this.listView1);
				this.groupBox2.Controls.AddRange (theControlArray3);
				this.groupBox2.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.groupBox2.ForeColor = Color.Coral;
				this.groupBox2.Location = new Point (360, 45);
				this.groupBox2.Name = "groupBox2";
				this.groupBox2.Size = new System.Drawing.Size (344, 307);
				this.groupBox2.TabIndex = 2;
				this.groupBox2.TabStop = false;
				this.groupBox2.Text = "B?nh ?n";
				this.label16.Font = new System.Drawing.Font ("Verdana", 9F, (FontStyle.Bold | FontStyle.Underline), GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label16.ForeColor = Color.MediumBlue;
				this.label16.Location = new Point (16, 72);
				this.label16.Name = "label16";
				this.label16.Size = new System.Drawing.Size (96, 23);
				this.label16.TabIndex = 18;
				this.label16.Text = "Tri?u ch?ng:";
				this.listView1.AllowColumnReorder = true;
				this.listView1.BorderStyle = BorderStyle.FixedSingle;
				this.listView1.FullRowSelect = true;
				this.listView1.Location = new Point (200, 96);
				this.listView1.MultiSelect = false;
				this.listView1.Name = "listView1";
				this.listView1.Size = new System.Drawing.Size (128, 200);
				this.listView1.TabIndex = 20;
				this.listView1.View = View.List;
				this.listView1.MouseDown += new MouseEventHandler (this.listView1_MouseDown);
				this.listView1.DoubleClick += new EventHandler (this.listView1_DoubleClick);
				this.listView1.SelectedIndexChanged += new EventHandler (this.listView1_SelectedIndexChanged);
				theControlArray4 = new Control[3];
				theControlArray4[0] = ((Control) this.btReset);
				theControlArray4[1] = ((Control) this.btLuuBenhAn);
				theControlArray4[2] = ((Control) this.btThoat);
				this.groupBox4.Controls.AddRange (theControlArray4);
				this.groupBox4.Location = new Point (360, 352);
				this.groupBox4.Name = "groupBox4";
				this.groupBox4.Size = new System.Drawing.Size (344, 48);
				this.groupBox4.TabIndex = 3;
				this.groupBox4.TabStop = false;
				this.btReset.FlatStyle = FlatStyle.Popup;
				this.btReset.Location = new Point (8, 16);
				this.btReset.Name = "btReset";
				this.btReset.Size = new System.Drawing.Size (128, 23);
				this.btReset.TabIndex = 22;
				this.btReset.Text = "B?nh Nh?n M?i";
				this.btReset.Click += new EventHandler (this.btReset_Click);
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (710, 411);
				theControlArray5 = new Control[5];
				theControlArray5[0] = ((Control) this.groupBox4);
				theControlArray5[1] = ((Control) this.groupBox3);
				theControlArray5[2] = ((Control) this.groupBox1);
				theControlArray5[3] = ((Control) this.groupBox2);
				theControlArray5[4] = ((Control) this.label19);
				base.Controls.AddRange (theControlArray5);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmLapHSBenhAnYTa";
				base.StartPosition = FormStartPosition.CenterScreen;
				this.Text = "L?p H? S? B?nh ?n B";
				base.Load += new EventHandler (this.frmLapHSBenhAnYTa_Load);
				this.groupBox3.ResumeLayout (false);
				this.groupBox1.ResumeLayout (false);
				this.groupBox2.ResumeLayout (false);
				this.groupBox4.ResumeLayout (false);
				base.ResumeLayout (false);
				return;
			}
			
			private void insertChildNode (string strName)
			
			{
				TreeNode theTreeNode = this.node.Nodes.Add (strName);
				return;
			}
			
			private void insertParentNode (string strName)
			
			{
				this.node = new TreeNode (strName);
				return;
			}
			
			private bool IsFloat (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					float theSingle = float.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			private bool IsNumber (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = long.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			private void linkLabel1_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e)
			
			{
				this.fKQ = new frmKQXetNghiem (this.tbID.Text, this.tbFullName.Text, this.clrISN, this.insertXetNghiem);
				this.fKQ.ShowInTaskbar = false;
				DialogResult theDialogResult = this.fKQ.ShowDialog ();
				return;
			}
			
			private void listView1_DoubleClick (object sender, EventArgs e)
			
			{
				ListViewItem theListViewItem;
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0036;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				this.listView1.Items.Remove (theListViewItem);
				
			L_0036:
				return;
			}
			
			private void listView1_MouseDown (object sender, MouseEventArgs e)
			
			{
				frmBangMau theFrmBangMau;
				ListViewItem theListViewItem;
				ListViewItem theListViewItem2;
				ListViewItem[] theListViewItemArray;
				if (e.Button != MouseButtons.Right)
				{
					goto L_0116;
				}
				theFrmBangMau = new frmBangMau ();
				theFrmBangMau.ShowInTaskbar = false;
				DialogResult theDialogResult = theFrmBangMau.ShowDialog ();
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0116;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				theListViewItem2 = new ListViewItem (theListViewItem.Text.ToString ());
				if (Class.mau != "Red")
				{
					goto L_0079;
				}
				theListViewItem2.ForeColor = Color.Red;
				
			L_0079:
				
				{
				}
				if (Class.mau != "Green")
				{
					goto L_0095;
				}
				theListViewItem2.ForeColor = Color.Green;
				
			L_0095:
				
				{
				}
				if (Class.mau != "Purple")
				{
					goto L_00B1;
				}
				theListViewItem2.ForeColor = Color.Purple;
				
			L_00B1:
				
				{
				}
				if (Class.mau != "Blue")
				{
					goto L_00CD;
				}
				theListViewItem2.ForeColor = Color.Blue;
				
			L_00CD:
				
				{
				}
				if (Class.mau != "Gray")
				{
					goto L_00E9;
				}
				theListViewItem2.ForeColor = Color.Gray;
				
			L_00E9:
				
				{
				}
				theListViewItemArray = new ListViewItem[1];
				theListViewItemArray[0] = theListViewItem2;
				this.listView1.Items.AddRange (theListViewItemArray);
				this.listView1.Items.Remove (theListViewItem);
				
			L_0116:
				return;
			}
			
			private void listView1_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				ListViewItem theListViewItem;
				if (this.listView1.SelectedItems.Count <= 0)
				{
					goto L_0041;
				}
				theListViewItem = this.listView1.SelectedItems[0];
				this.toolTip1.SetToolTip (((Control) this.listView1), theListViewItem.Text.ToString ());
				
			L_0041:
				return;
			}
			
			private void LoadCayBenh ()
			
			{
				ArrayList theArrayList;
				ArrayList theArrayList2;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				DataTable theDataTable;
				int i;
				int i2;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				DataTable theDataTable2;
				int i3;
				theArrayList = new ArrayList ();
				theArrayList2 = new ArrayList ();
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter ("select distinct(sktisn), sktname from vw_SickTree_Sicks order by sktName", theSqlConnection);
				theDataSet = new DataSet ();
				int i4 = theSqlDataAdapter.Fill (theDataSet, "vw_SickTree_Sicks");
				if (theDataSet == null)
				{
					goto L_0188;
				}
				
			L_0042:
				
				{
				}
				theDataTable = theDataSet.Tables["vw_SickTree_Sicks"];
				i = 0;
				goto L_00A0;
				
			L_005A:
				
				{
				}
				int i5 = theArrayList.Add (theDataTable.Rows[i][0].ToString ());
				int i6 = theArrayList2.Add (theDataTable.Rows[i][1].ToString ());
				i++;
				
			L_00A0:
				
				{
				}
				if (i < theDataTable.Rows.Count)
				{
					goto L_005A;
				}
				i2 = 0;
				goto L_016F;
				
			L_00B8:
				
				{
				}
				this.insertParentNode (theArrayList2[i2].ToString ());
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("SELECT * FROM Sicks WHERE sktISN=", theArrayList[i2].ToString (), " order by  sckName"), theSqlConnection);
				theDataSet2 = new DataSet ();
				int i7 = theSqlDataAdapter2.Fill (theDataSet2, "Sicks");
				theDataTable2 = theDataSet2.Tables["Sicks"];
				i3 = 0;
				goto L_0142;
				
			L_011D:
				
				{
				}
				this.insertChildNode (theDataTable2.Rows[i3][2].ToString ());
				i3++;
				
			L_0142:
				
				{
				}
				if (i3 < theDataTable2.Rows.Count)
				{
					goto L_011D;
				}
				int i8 = this.treeView1.Nodes.Add (this.node);
				i2++;
				
			L_016F:
				
				{
				}
				if (i2 < theArrayList.Count)
				{
					goto L_00B8;
				}
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				
			L_0188:
				return;
			}
			
			private void LoadID ()
			
			{
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter ("SELECT * FROM Patients", theSqlConnection);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "Patients");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0065;
				}
				
			L_0053:
				
				{
				}
				this.tbID.Text = "1";
				goto L_00BE;
				
			L_0065:
				
				{
				}
				this.tbID.Text = Convert.ToString (((long) (Convert.ToInt64 (theDataSet.Tables["Patients"].Rows[((int) (theDataSet.Tables["Patients"].Rows.Count - 1))][1].ToString ()) + ((long) 1))));
				
			L_00BE:
				
				{
				}
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				return;
			}
			
			private void treeView1_DoubleClick (object sender, EventArgs e)
			
			{
				string theString;
				int i;
				int i2;
				ListViewItem theListViewItem;
				int i3;
				ListViewItem theListViewItem2;
				ListViewItem[] theListViewItemArray;
				ListViewItem[] theListViewItemArray2;
				
			L_0000:
				try
				{
					theString = this.treeView1.SelectedNode.Text.ToString ();
					i = 0;
					i2 = 0;
					if (this.treeView1.SelectedNode.Parent.IsSelected)
					{
						goto L_0115;
					}
					i = this.listView1.Items.Count;
					if (i != 0)
					{
						goto L_0092;
					}
					theListViewItem = new ListViewItem (this.treeView1.SelectedNode.Text.ToString ());
					theListViewItem.ForeColor = Color.Gray;
					theListViewItemArray = new ListViewItem[1];
					theListViewItemArray[0] = theListViewItem;
					this.listView1.Items.AddRange (theListViewItemArray);
					goto L_0115;
					
				L_0092:
					
					{
					}
					i3 = 0;
					goto L_00C5;
					
				L_0097:
					
					{
					}
					if (theString != this.listView1.Items[i3].Text.ToString ())
					{
						goto L_00BF;
					}
					i2++;
					
				L_00BF:
					
					{
					}
					i3++;
					
				L_00C5:
					
					{
					}
					if (i3 < i)
					{
						goto L_0097;
					}
					if (i2 != 0)
					{
						goto L_0115;
					}
					theListViewItem2 = new ListViewItem (this.treeView1.SelectedNode.Text.ToString ());
					theListViewItem2.ForeColor = Color.Gray;
					theListViewItemArray2 = new ListViewItem[1];
					theListViewItemArray2[0] = theListViewItem2;
					this.listView1.Items.AddRange (theListViewItemArray2);
					
				L_0115:
					
					{
					}
				}
				catch
				{
					
				L_0117:
					
					{
					}
				}
				
			L_011A:
				return;
			}
			
		#endregion
	}
	
}

